<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>星调查问卷系统</title>

    <!-- BOOTSTRAP STYLES-->
    <link href="css/bootstrap.css" rel="stylesheet" />
    <!-- FONTAWESOME STYLES-->
    <link href="css/font-awesome.css" rel="stylesheet" />
       <!--CUSTOM BASIC STYLES-->
    <link href="css/basic.css" rel="stylesheet" />
    <!--CUSTOM MAIN STYLES-->
    <link href="css/custom.css" rel="stylesheet" />
    <!-- GOOGLE FONTS-->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
    
    <link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
</head>
<body>
    <div id="wrapper">
        <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="home.jsp">星调查问卷系统</a>
            </div>
        </nav>
        <!-- /. NAV TOP  -->
        <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">
                    <li>
                        <div class="user-img-div">
                        		<c:if test="${sessionScope.users.user_photo==null }">
                             	<img src="images/user.png" class="img-thumbnail" />
							</c:if> 
                            <c:if test="${sessionScope.users.user_photo!=null }">
                            		<img src="${pageContext.request.contextPath}/images/user/${sessionScope.users.user_name}.${sessionScope.users.user_photo}" class="img-thumbnail">
							</c:if> 
                            <div class="inner-text">
                                <span>${sessionScope.users.user_name }</span>
                            <br />
                                <small>
                                		用户级别：
                                		<c:if test="${sessionScope.users.user_root==1 }">
                                			管理员
									</c:if> 
									<c:if test="${sessionScope.users.user_root==0}">
                                			普通用户
									</c:if> 
									<form action="${pageContext.request.contextPath}/outLogin.do">
										<table>
											<tr>
												<td><input type="submit" value="退出登录" class="form-control input-sm"></td>
											</tr>
										</table>
									</form>
								</small>
                            </div>
                        </div>
                    </li>
                    
                    <li>
                        <a  href="${pageContext.request.contextPath}/home.do"><i class="fa fa-dashboard "></i>我的问卷</a>
                    </li>
                  
                    <li>
                        <a class="active-menu" href="${pageContext.request.contextPath}/newSurvey.do"><i class="fa fa-flash "></i>新建问卷 </a>
                    </li>
                    <li>
                    <a href="${pageContext.request.contextPath}/allSurvey.do"><i class="fa fa-flash "></i>所有问卷</a>           
                		</li>
                		<c:if test="${sessionScope.users.user_root==1 }">
	                <li>
	                    <a href="${pageContext.request.contextPath}/adminView.do"><i class="fa fa-flash "></i>用户管理</a>           
	                </li>
                </c:if>
                </ul>
            </div>

        </nav>
        <!-- /. NAV SIDE  -->
        <div id="page-wrapper">
            <div id="page-inner">
                <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-head-line">新建问卷</h1>
                    </div>
                </div>
                <!-- /. ROW  -->
                <div class="row">
                		<div class="main-box ">
						<form id="newSurvey" class="form-inline" action="${pageContext.request.contextPath}/newSurvey.do" method="post">
							<div class="form-group">
								<label for="exampleInputName2">问卷名：</label> 
								<input type="text" class="form-control" id="survey_name" name="survey_name" datatype="*" nullmsg="请输入问卷名！">
							</div>
							<div class="form-group">
								<label for="exampleInputEmail2">截止时间：</label> 
								<input type="text" class="form-control" placeholder="2012-05-15 21:05" id="survey_endTime" name="survey_endTime" datatype="*" nullmsg="请选择截止时间！">
								<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
							</div>
							<div class="form-group">
								<label for="exampleInputEmail2">问卷介绍：</label> 
								<textarea class="form-control" rows="2" id="survey_other" name="survey_other"></textarea>
							</div>						
							<button type="submit" class="btn btn-default">创建</button>
						</form>
					</div>
                </div>
                <!-- /. ROW  -->

            </div>
            <!-- /. PAGE INNER  -->
        </div>
        <!-- /. PAGE WRAPPER  -->
    </div>
      <!-- /. FOOTER  -->
    <!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
    <!-- JQUERY SCRIPTS -->
    <script src="js/jquery-1.10.2.js"></script>
    <!-- BOOTSTRAP SCRIPTS -->
    <script src="js/bootstrap.min.js"></script>
    <!-- METISMENU SCRIPTS -->
    <script src="js/jquery.metisMenu.js"></script>
       <!-- CUSTOM SCRIPTS -->
    <script src="js/custom.js"></script>
    
    <script type="text/javascript" src="js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
	<script type="text/javascript" src="js/locales/bootstrap-datetimepicker.fr.js" charset="UTF-8"></script>
    <script src="js/Validform_v5.3.2_min.js"></script>
    
    <script>
    		$(document).ready(function(){
    			$('#survey_endTime').datetimepicker({
    				format : 'yyyy-mm-dd hh:ii:ss',
    				autoclose : 'ture',
    				todayHighlight : 'true',
    			});
    			
    			$('#newSurvey').Validform({
    				tiptype:3, 
    			});
    		})
		
	</script>
</body>
</html>